.foxui-iconsel {
    position: relative;
    line-height: normal;
    display: inline-block;
    box-sizing: border-box;
    height: 40px;
    width: 40px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 0;

    &.foxui-size-xl {
        height: 48px;
        width: 48px;

        .foxui-icon-jiahao-o {
            font-size: 22px;
        }

        .foxui-iconsel-show {
            i {
                font-size: 32px;
            }
        }
    }

    &.foxui-size-lg {
        height: 44px;
        width: 44px;

        .foxui-icon-jiahao-o {
            font-size: 22px;
        }

        .foxui-iconsel-show {
            i {
                font-size: 28px;
            }
        }
    }

    &.foxui-size-medium {
        height: 36px;
        width: 36px;

        .foxui-icon-jiahao-o {
            font-size: 18px;
        }

        .foxui-iconsel-show {
            i {
                font-size: 20px;
            }
        }
    }

    &.foxui-size-small {
        height: 32px;
        width: 32px;

        .foxui-icon-jiahao-o {
            font-size: 14px;
        }

        .foxui-iconsel-show {
            i {
                font-size: 16px;
            }
        }
    }
}

.foxui-iconsel-handle {
    width: 100%;
    height: 100%;
    padding: 4px;
    cursor: pointer;

    .foxui-icon-jiahao-o {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 22px;
        z-index: 1;
        color: $--color-primary;
    }

    .delete {
        position: absolute;
        top: -2px;
        right: -2px;
        font-size: 18px;
        color: rgba($color: #707070, $alpha: 1);
        cursor: pointer;
        transition: $--fade-transition;
        opacity: 0;
        z-index: 3;

        &::after {
            content: '';
            display: inline-block;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 18px;
            height: 18px;
            background-color: #fff;
            border-radius: 100%;
            z-index: -1;
        }
    }
}

.foxui-iconsel-show {
    width: calc(100% - 4px * 2);
    height: calc(100% - 4px * 2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;

    i {
        font-size: 28px;
        background-color: #fff;
    }

    .img-icon {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
    }

    img {
        width: 80%;
        height: 80%;
        object-fit: contain;
    }
}

.foxui-iconsel-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

// 图标管理器
.foxui-iconsel-dialog {
    .foxui-dialog__body {
        border-top: $--border-base;
        padding: 0 !important;
    }

    .foxui-dialog__footer {
        display: none;
    }

    .group-content,
    .icons-content {
        height: 600px;
        overflow: auto;
    }

    .group-item {
        line-height: 3.6;
        padding: 0 $--padding-base;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: $--background-color-transition-base;
        border-right: transparent solid 2px;

        &:not(.is-active) {
            cursor: pointer;
        }

        &:hover {
            background-color: $--color-primary-light-9;
        }

        &.is-active {
            background-color: $--color-primary-light-8;
            color: $--color-primary;
            border-right: $--color-primary solid 2px;
        }

        span {
            width: 70%;
        }

        strong {
            font-weight: normal;
        }
    }

    .icons-content {
        padding: 12px;
    }

    .icon-item {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 100%;
        overflow: hidden;
        border: transparent solid 1px;
        transition: $--background-color-transition-base;
        cursor: pointer;

        &:hover {
            background-color: $--color-primary-light-9;
            color: $--color-primary;
            border-color: $--color-primary;
        }
    }

    .icon-item-inner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 80%;

        i {
            font-size: 28px;
        }

        img {
            width: 60%;
            height: 60%;
            object-fit: contain;
        }

        span {
            margin-top: 6px;
            font-size: 12px;
        }
    }
}
